<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: navo/algorithm/crypto/symmetric/cast5.c文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<h1>navo/algorithm/crypto/symmetric/cast5.c文件参考</h1>  </div>
</div>
<div class="contents">

<p>Cast5.  
<a href="#_details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="cast5_8h_source.html">cast5.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="endian_8h_source.html">../../../port/endian.h</a>&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
</div>
<p><a href="cast5_8c_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a690d30e9ad3647835c243368b36d4c41"></a><!-- doxytag: member="cast5.c::S1" ref="a690d30e9ad3647835c243368b36d4c41" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S1</b>&#160;&#160;&#160;__cast_s1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5e70dee3c36d645b0eb1743b8a7d2bf"></a><!-- doxytag: member="cast5.c::S2" ref="ad5e70dee3c36d645b0eb1743b8a7d2bf" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S2</b>&#160;&#160;&#160;__cast_s2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab29872af8ce9dc9463b7f7ecfbea02ae"></a><!-- doxytag: member="cast5.c::S3" ref="ab29872af8ce9dc9463b7f7ecfbea02ae" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3</b>&#160;&#160;&#160;__cast_s3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6dd50ea82e237280daf26bd9b562ba9"></a><!-- doxytag: member="cast5.c::S4" ref="ac6dd50ea82e237280daf26bd9b562ba9" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S4</b>&#160;&#160;&#160;__cast_s4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>FN</b>(i, r)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8760a0f023a7c5fda0b13c19f0b54b2"></a><!-- doxytag: member="cast5.c::F1" ref="af8760a0f023a7c5fda0b13c19f0b54b2" args="(i, d, m, r)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>F1</b>(i, d, m, r)&#160;&#160;&#160;((i) = ((m) + (d)), FN(i, r))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ee4945ef9bf07e5a10973748d49c733"></a><!-- doxytag: member="cast5.c::F2" ref="a5ee4945ef9bf07e5a10973748d49c733" args="(i, d, m, r)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>F2</b>(i, d, m, r)&#160;&#160;&#160;((i) = ((m) ^ (d)), FN(i, r))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05267906f37c1641789dad361a00f447"></a><!-- doxytag: member="cast5.c::F3" ref="a05267906f37c1641789dad361a00f447" args="(i, d, m, r)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>F3</b>(i, d, m, r)&#160;&#160;&#160;((i) = ((m) - (d)), FN(i, r))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adae188fd0afc9dbe74fcde63af88c173"></a><!-- doxytag: member="cast5.c::ROUND1" ref="adae188fd0afc9dbe74fcde63af88c173" args="(i, l, r, t, c)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ROUND1</b>(i, l, r, t, c)&#160;&#160;&#160;(t) = (l); (l) = (r); (r) = (t) ^ F1(i, r, km[c], kr[c])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8571fc8701602c0194aeed51288ad882"></a><!-- doxytag: member="cast5.c::ROUND2" ref="a8571fc8701602c0194aeed51288ad882" args="(i, l, r, t, c)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ROUND2</b>(i, l, r, t, c)&#160;&#160;&#160;(t) = (l); (l) = (r); (r) = (t) ^ F2(i, r, km[c], kr[c])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5880c2dab9a1a33d9260e0d3870093e8"></a><!-- doxytag: member="cast5.c::ROUND3" ref="a5880c2dab9a1a33d9260e0d3870093e8" args="(i, l, r, t, c)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ROUND3</b>(i, l, r, t, c)&#160;&#160;&#160;(t) = (l); (l) = (r); (r) = (t) ^ F3(i, r, km[c], kr[c])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11f81625e40d092a293513b8c708f899"></a><!-- doxytag: member="cast5.c::XI" ref="a11f81625e40d092a293513b8c708f899" args="(i)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XI</b>(i)&#160;&#160;&#160;((x[(i) &gt;&gt; 2] &gt;&gt; ((3 - ((i) &amp; 3)) &lt;&lt; 3)) &amp; 0xFF)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72704f30645544f54e9b4d86a357ff6e"></a><!-- doxytag: member="cast5.c::ZI" ref="a72704f30645544f54e9b4d86a357ff6e" args="(i)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ZI</b>(i)&#160;&#160;&#160;((z[(i) &gt;&gt; 2] &gt;&gt; ((3 - ((i) &amp; 3)) &lt;&lt; 3)) &amp; 0xFF)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a336af6aa1668466c753dbba9bda75c2e"></a><!-- doxytag: member="cast5.c::__cast5_key_schedule" ref="a336af6aa1668466c753dbba9bda75c2e" args="(uint32_t *x, uint32_t *z, uint32_t *k)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__cast5_key_schedule</b> (uint32_t *x, uint32_t *z, uint32_t *k)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacf45103be83fef3c814bb871ef02b133"></a><!-- doxytag: member="cast5.c::__cast5_set_key" ref="gacf45103be83fef3c814bb871ef02b133" args="(cast5_key *key, uint32_t *km, uint8_t *kr, uint8_t *src_key, size_t cnt)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__cast5_set_key</b> (<a class="el" href="structcast5__key.html">cast5_key</a> *key, uint32_t *km, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *kr, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *src_key, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa16476e0fc642d4af4a72f8eaaef7c28"></a><!-- doxytag: member="cast5.c::__cast5_encrypt" ref="gaa16476e0fc642d4af4a72f8eaaef7c28" args="(uint32_t *km, uint8_t *kr, int rd, uint32_t *dst, uint32_t *src)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__cast5_encrypt</b> (uint32_t *km, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *kr, int rd, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga47a75b133bcbb14cf0de836917a12d32"></a><!-- doxytag: member="cast5.c::__cast5_decrypt" ref="ga47a75b133bcbb14cf0de836917a12d32" args="(uint32_t *km, uint8_t *kr, int rd, uint32_t *dst, uint32_t *src)" -->
NV_IMPL void&#160;</td><td class="memItemRight" valign="bottom"><b>__cast5_decrypt</b> (uint32_t *km, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *kr, int rd, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
变量</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac62cad0363faa229a853fd5bc1f2bf43"></a><!-- doxytag: member="cast5.c::S5" ref="ac62cad0363faa229a853fd5bc1f2bf43" args="[256]" -->
static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>S5</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad69171984237c2df737b5f48f15555a2"></a><!-- doxytag: member="cast5.c::S6" ref="ad69171984237c2df737b5f48f15555a2" args="[256]" -->
static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>S6</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a127c73c3381eafca828bf9dbf352592b"></a><!-- doxytag: member="cast5.c::S7" ref="a127c73c3381eafca828bf9dbf352592b" args="[256]" -->
static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>S7</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66c2501d49aea657b8fea58865612462"></a><!-- doxytag: member="cast5.c::S8" ref="a66c2501d49aea657b8fea58865612462" args="[256]" -->
static const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>S8</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6c0425fe9445662d9243769f293042b"></a><!-- doxytag: member="cast5.c::__cast_s1" ref="ae6c0425fe9445662d9243769f293042b" args="[256]" -->
const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>__cast_s1</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a928b06a1b3c7c6b0d256d2518de1de10"></a><!-- doxytag: member="cast5.c::__cast_s2" ref="a928b06a1b3c7c6b0d256d2518de1de10" args="[256]" -->
const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>__cast_s2</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef3c786cbaadc94735d8dc42662bb29c"></a><!-- doxytag: member="cast5.c::__cast_s3" ref="aef3c786cbaadc94735d8dc42662bb29c" args="[256]" -->
const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>__cast_s3</b> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4e820278e208d6154cd3c109a87fb51c"></a><!-- doxytag: member="cast5.c::__cast_s4" ref="a4e820278e208d6154cd3c109a87fb51c" args="[256]" -->
const uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>__cast_s4</b> [256]</td></tr>
</table>
<hr/><a name="_details"></a><h2>详细描述</h2>
<div class="textblock"><p>Cast5. </p>
<p>Copyright (C) 2012-2022, Henry Kwok 郭弘扬. All rights reserved </p>

<p>在文件<a class="el" href="cast5_8c_source.html">cast5.c</a>中定义。</p>
</div><hr/><h2>宏定义文档</h2>
<a class="anchor" id="a23a7ac02e1858ea863afcb87d68cb53c"></a><!-- doxytag: member="cast5.c::FN" ref="a23a7ac02e1858ea863afcb87d68cb53c" args="(i, r)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">r&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">((i) = <a class="code" href="group___xE4_xBA_xA4_xE6_x8D_xA2_xE5_xAD_x97_xE5_xBA_x8F.html#ga5c40024969f5f66c871e34d8150685d2" title="左旋转32位整数b位">__rol32</a>((i), (r)), \
    ((S1[(i) &gt;&gt; 24] ^ S2[((i) &gt;&gt; 16) &amp; 0xFF]) - \
    S3[((i) &gt;&gt; 8) &amp; 0xFF] + S4[(i) &amp; 0xFF]))
</pre></div>
<p>在文件<a class="el" href="cast5_8c_source.html">cast5.c</a>第<a class="el" href="cast5_8c_source.html#l00302">302</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:38 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
